﻿@model IEnumerable<Mvc.Models.Group>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Nombre)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Nombre)
        </td>
        <td>
            

                @Ajax.ActionLink("Editar", "Edit", "Groups", new { GroupId = item.GroupId }, new AjaxOptions { UpdateTargetId = "content", InsertionMode = InsertionMode.Replace, HttpMethod = "GET" })

                @Ajax.ActionLink("Detalle", "Details", "Groups", new { GroupId = item.GroupId }, new AjaxOptions { UpdateTargetId = "content", InsertionMode = InsertionMode.Replace, HttpMethod = "GET" })
                @Ajax.ActionLink("Borrar", "Delete", "Groups", new { GroupId = item.GroupId }, new AjaxOptions { UpdateTargetId = "content", InsertionMode = InsertionMode.Replace, HttpMethod = "GET" })
                @Ajax.ActionLink("Permisos", "index", "Permissions", new { GroupId = item.GroupId }, new AjaxOptions { UpdateTargetId = "content", InsertionMode = InsertionMode.Replace, HttpMethod = "GET" })


            </td>
        
    </tr>
}

</table>
